package com.sky.business.sys.service;

import com.sky.business.sys.domain.CameraPreset;
import com.sky.business.sys.dto.CameraRtspInfo;
import com.sky.business.sys.dto.OnvifDeviceInfo;

import javax.xml.soap.SOAPException;
import java.net.ConnectException;
import java.util.List;

public interface OnvifService {

    void move(String ip,int port, String username, String password,float x, float y, float zoom) throws SOAPException, ConnectException;

    void stop(String ip,int port, String username, String password) throws SOAPException, ConnectException;

    void setPreset(Integer id, String ip,int port, String username, String password) throws SOAPException, ConnectException;

    List<CameraPreset> getPresetData(Integer cameraConfigId);

    void gotoPreset(String ip, int port,String username, String password, String presetToken) throws SOAPException, ConnectException;

    /**
     * 聚焦+,越近的物体看的越清楚,聚焦- 越远的物体看的越清楚
     * @param ip  ip地址
     * @param port 端口
     * @param username 用户名
     * @param password 密码
     * @param negative  聚焦-
     * @throws SOAPException  soap格式异常
     * @throws ConnectException 连接异常
     */
    void moveFocus(String ip,int port,String username,String password,boolean negative) throws SOAPException, ConnectException;


    /**
     * 停机聚焦
     * @param ip ip地址
     * @param port 端口
     * @param username 用户名
     * @param password 密码
     * @return 是否成功
     * @throws SOAPException soap格式异常
     * @throws ConnectException 连接异常
     */
    boolean  stopMoveFocus(String ip,int port,String username,String password) throws SOAPException, ConnectException;

    /**
     * 查询rtsp直播流信息列表
     * @param ip ip地址
     * @param port 端口
     * @param username 用户名
     * @param password 密码
     * @return rtsp流列表
     * @throws SOAPException soap异常
     * @throws ConnectException  连接异常
     */
    List<CameraRtspInfo> getRtspStreamList(String ip,int port,String username,String password)throws SOAPException, ConnectException;


    /**
     * 查询设备信息
     * @param ip ip地址
     * @param port 端口
     * @param username 用户名
     * @param password 密码
     * @return rtsp流列表
     * @throws SOAPException soap异常
     * @throws ConnectException  连接异常
     */
    OnvifDeviceInfo getDeviceInformation(String ip, int port, String username, String password)throws SOAPException, ConnectException;


    /**
     * 查找最接近FHD的直播流
     * @param cameraRtspInfoList rtsp流信息
     * @return rtsp直播流
     */
    String getFhdRtspUrl(List<CameraRtspInfo> cameraRtspInfoList);

    void delPreset(Integer id, String ip, int port,String username, String password, String presetToken) throws SOAPException, ConnectException;

    void updatePresetName(Integer presetId, String ip, int port,String username, String password, String name, String presetToken) throws SOAPException, ConnectException;

    /**
     * 设置红外滤光片模式
     * @param ip IP地址
     * @param port 端口
     * @param username 用户名
     * @param password 密码
     * @param mode 模式  1:白天  2:夜晚  3:自动
     * @throws SOAPException soap格式异常
     * @throws ConnectException 连接异常
     */
    void setIrCutFilterMode(String ip,int port,String username,String password,int mode) throws SOAPException, ConnectException;
}
